#include "ArrayIterator_t.h"

template<class T>
ArrayIterator_t<T>::ArrayIterator_t(const Array_t<T>& context)
	: m_context(context)
	, m_currIndex(-1)
{
	// TODO: implementation
}

template<class T>
ArrayIterator_t<T>::~ArrayIterator_t()
{
	// TODO: implementation
}

template<class T>
T* ArrayIterator_t<T>::get() const
{
	if(m_currIndex < 0 || m_currIndex >= (int)m_context.m_capacity)
		return NULL;

	return m_context.m_impl[m_currIndex];
}

template<class T>
bool ArrayIterator_t<T>::hasNext() const
{
	return m_currIndex < (int)m_context.m_capacity;
}

template<class T>
void ArrayIterator_t<T>::next()
{
	if(!hasNext())
		return;

	m_currIndex++;
}